<?php /* Copyright 2010 Karl R. Wilcox 

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License. */

// Astronomy

$charge = array (

  'patterns' => array (
  '?astronomical characters? ?of ?the ?planet ',
  ),
  
  'flags' => array (
    'default_colour' => 'sable',
    'get_item' => 1,
  ),

  'doc' => 'Stuff...',
  
  'proper' => rgb('sable'),
  'orient_to_ordinary' => true,

);


if ( $node != null ) {

  $item = get_mod( $node, 'item' );
  switch (strtolower($item)) {
    case 'sun': $rest = array ( 'height' => 400, 'width' => 400,
      'body' => '<path  stroke="inherit" stroke-width="2" d="M 159,390 C 89.6,360 37.6,313 20.2,247 13.6,222 13.6,177 20.4,151 39,80 102,23 175,14 272,1 351,48 386,137 c 10,31 14,79 3,112 -27,101 -134,161 -230,141 z m 86,-55 c 37,-12 71,-41 88,-78 9,-17 10,-24 10,-57 0,-37 -1,-40 -12,-62 C 289,52 176,34 107,102 c -76.4,74 -44.1,200 59,233 19,6 59,6 79,0 z M 174,233 c -17,-16 -20,-33 -11,-51 13,-26 43,-36 66,-22 14,8 22,23 22,43 0,15 -2,18 -14,30 -12,12 -15,13 -31,13 -17,0 -20,-1 -32,-13 z" />' );
      break;
    case 'moon': $rest = array ( 'height' => 400, 'width' => 289,
      'body' => '<path  stroke="inherit" stroke-width="2" d="M 171,389 C 134,378 104,364 76,335 62.4,321 47.1,302 41.9,292 29.9,270 18.5,226 18.6,203 c 0.1,-26 12,-70 25,-93 C 68.7,66.2 119,29.4 168,19.2 c 23,-4.8 82,-2.7 94,3.4 4,2.4 9,8.3 11,13.3 5,12.9 -3,23 -24,30.6 C 201,85 166,128 157,181 c -10,63 24,126 86,155 31,15 37,25 28,39 -10,14 -61,21 -100,14 z m -3,-49 c 0,-3 -5,-10 -11,-18 -26,-29 -44,-81 -44,-119 0,-39 16,-85 42,-117.3 12,-16.1 16,-24.4 11,-24.4 -1,0 -13,5.6 -26,12.5 C 52,120 34.6,235 105,304 c 11,12 28,25 39,30 21,10 24,11 24,6 z" />' );
      break;
    case 'mercury': $rest = array ( 'height' => 400, 'width' => 245,
      'body' => '<path  stroke="inherit" stroke-width="2" d="m 113,382 c -2,-3 -3,-8 -3,-15 l 0,-10 -11.1,0 c -13.5,0 -16.8,-3 -16.8,-15 0,-15 3.2,-18 16.8,-18 l 11.1,0 -1,-15 -1,-12 -12.1,-5 c -21,-8 -34.1,-15 -47.8,-28 -21.2,-22 -31,-46 -31,-77 0,-34 11.7,-60 37.5,-83 L 70.6,89.4 59.1,77.7 C 41.6,59.4 28.8,30.2 35.1,22.6 c 1.5,-1.7 7.5,-3.2 13.5,-3.2 l 11,0 7,15.8 c 20.8,45.2 72.4,55 106.4,20.2 5,-5 11,-15 14,-22 l 5,-12.7 13,0 13,0 0,10.2 c -1,13.8 -10,32.8 -25,47.5 -6,6.8 -11,12.8 -11,13.5 0,0.8 5,4.5 10,8.1 16,11 32,35 38,55 10,34 2,73 -21,102 -10,12 -33,27 -50,35 -18,5 -20,7 -19,20 1,10 1,12 8,12 19,0 19,3 19,18 0,12 0,15 -19,15 -7,0 -7,2 -8,12 0,5 -2,13 -4,13 -4,2 -20,2 -23,0 z m 43,-123 c 15,-6 33,-23 40,-38 24,-47 -8,-106 -63,-113 -25,-4 -58.9,13 -73.7,36 -10,16 -13,28 -11.7,49 1.7,27 16,50 39.2,61 22.2,13 47.2,15 69.2,5 z" />' );
      break;
    case 'venus': $rest = array ( 'height' => 400, 'width' => 266,
      'body' => '<path  stroke="inherit" stroke-width="2" d="m 121,369 c 0,-11 -2,-20 -4,-23 -2,0 -12,-3 -21.9,-3 -20.1,-3 -22.6,-3 -18.9,-20 1.7,-5 3.1,-5 19.7,-5 10.1,0 19.1,-3 21.1,-3 2,-3 4,-12 4,-26 0,-22 -3,-26 -21.7,-30 C 82.8,255 57.3,239 43.6,224 26.4,205 16.7,185 12.1,158 8.99,141 9.14,135 13.1,118 19.2,90.1 29.8,70 47.6,52.5 95.6,5.89 173,6 220,52.8 c 28,28.4 41,70.2 34,108.2 -9,49 -39,82 -87,98 l -19,6 -1,21 c 0,14 1,26 2,29 2,0 11,3 21,3 l 18,2 1,12 1,11 -19,0 c -11,0 -19,0 -21,3 -2,3 -3,12 -4,23 l -1,17 -12,0 -12,0 0,-17 z M 174,227 C 219,205 240,153 224,108 211,74.3 177,47.7 141,43.4 127,41.6 100,47.7 86.8,56 72.7,64.9 54.4,84.1 47,98.4 40.4,111 39.3,116 39.3,140 c 0,23 1.1,29 6.8,41 12.6,26 40.4,48 65.9,54 18,4 46,0 62,-8 z" />' );
      break;
    case 'earth': $rest = array ( 'height' => 400, 'width' => 400,
      'body' => '<path  stroke="inherit" stroke-width="2" d="m 175,21 50,0 0,156 157,0 0,49 -157,0 0,154 -50,0 0,-154 -156.4,0 0,-49 156.4,0 z" />
                 <path  stroke="inherit" stroke-width="2" d="M 199,3 C 90.2,3 2,91 2,200 2,309 90.2,400 199,400 308,400 396,309 396,200 396,91 308,3 199,3 z m 0,40 c 87,0 157,70 157,157 0,87 -70,160 -157,160 C 112,360 42,287 42,200 42,113 112,43 199,43 z" />' );
      break;
    case 'mars': $rest = array ( 'height' => 400, 'width' => 400,
      'body' => '<path  stroke="inherit" stroke-width="2" d="M 114,379 C 74.8,367 46.4,340 28.6,303 16.9,281 16.8,280 16.8,244 16.8,209 17,208 28,185 42.8,155 66.7,131 96.9,117 119,105 120,105 157,105 c 38,0 38,0 61,12 13,6 25,11 26,11 3,0 58,-54.9 58,-58.3 0,-1.2 -7,-2.1 -17,-2.1 -23,0 -25,-2.1 -24,-19.9 l 1,-14.8 53,-0.9 c 39,-0.6 54,0.3 54,3 3,4.5 3,93 0,100 0,4 -6,5 -18,5 -15,0 -15,0 -18,-10 0,-6 0,-14 0,-19 3,-5 3,-8 0,-9 -3,-1 -15,8 -34,26 l -27,28 10,21 c 42,82 4,175 -82,202 -22,9 -66,9 -86,0 z m 88,-39 c 20,-9 42,-34 51,-51 7,-15 9,-21 9,-45 0,-24 -1,-29 -9,-44 -11,-21 -33,-43 -53,-52 -20,-9 -65,-9 -86,0 -19.5,9 -42.8,32 -52.5,52 -7.2,15 -8.4,21 -8.4,44 0,22 1.5,31 6.6,42 12.1,26 43.3,54 68.3,60 18,6 60,0 74,-6 z" />' );
      break;
    case 'jupiter': $rest = array ( 'height' => 400, 'width' => 348,
      'body' => '<path  stroke="inherit" stroke-width="2" d="m 248,378 c -3,-4 -5,-18 -5,-36 l -1,-31 -97,-1 c -63.9,0 -98.3,-2 -101.5,-4 -5.4,-5 -6.5,-31 -1.1,-34 1.8,-1 11.8,-3 22.2,-4 C 127,261 181,186 174,115 171,78.4 149,55.1 119,55.1 c -19.6,0 -32.5,6.4 -47.5,23.7 -12.6,14.3 -12.6,10 -5.4,68.2 1.8,16 1.1,20 -4,21 -8.9,4 -24,-6 -33,-22 C 12,117 22.6,65.8 50.3,42.5 103,-1.83 175,11.6 204,71.6 c 12,24.7 12,78.4 1,113.4 -8,23 -32,64 -40,69 -2,1 -4,5 -4,9 0,7 2,7 40,6 l 41,-1 1,-116 c 0,-80.8 2,-117.3 5,-120.9 2,-3.2 9,-4.7 18,-4 l 15,1.1 1,115.8 c 0,79 2,118 5,122 2,2 10,4 18,4 l 14,0 -1,19 -1,19 -16,2 -16,1 -2,34 -2,36 -15,0 c -9,0 -16,0 -18,-3 z" />' );
      break;
    case 'saturn': $rest = array ( 'height' => 400, 'width' => 235,
      'body' => '<path  stroke="inherit" stroke-width="2" d="m 149,390 c -39,-19 -39,-67 -1,-112 28,-32 36,-51 36,-83 0,-27 -3,-38 -15,-49 -16,-14 -48,-6 -69,18 l -11.6,14 0,59 c 0,68 0.3,67 -24.5,67 C 41.4,304 42.3,309 41.4,194 40.4,92.7 40.4,90.8 34.1,90.8 19.4,90.8 15.3,85.4 15.3,65.6 15.3,45.9 17.5,43 32.5,43 38.2,43 40.1,40.5 42.7,29.5 L 45.5,16 62.3,15 c 20.4,-1.2 26.1,2.7 26.1,17.3 l 0,10.7 22.6,0 c 24,0 28,3.2 28,23.6 0,17.5 -8,24.2 -32,24.2 -18.6,0 -18.6,0 -18.6,9.2 0,11 1.9,12 11.1,6 19.5,-13 63.5,-16.2 83.5,-6 16,8 31,24 39,43 6,14 8,22 8,50 0,46 -9,68 -43,111 -19,22 -24,35 -19,38 2,3 5,3 9,0 4,0 9,-3 11,-3 5,0 27,22 27,29 0,3 -15,19 -27,25 -15,6 -23,3 -39,-3 z" />' );
      break;
    case 'uranus': $rest = array ( 'height' => 400, 'width' => 267,
      'body' => '<path  stroke="inherit" stroke-width="2" d="M 104,392 C 72.5,381 41,358 24.7,330 5.84,296 3.63,250 19.5,216 c 11.9,-25 35.3,-49 60.3,-62 10.7,-5 21.2,-9 24.2,-9 9,0 11,-7 11,-32 0,-13 -1,-24.8 -2,-25.7 -1,-0.8 -5,0.9 -7,4 -3,3.1 -8.2,5.6 -11.6,5.6 C 87.1,96.9 70.5,80.3 70.5,73.3 70.5,66 127,9.38 133,10.4 c 5,1 64,57 64,61.5 0,4.5 -22,25 -26,25 -2,0 -6,-2 -8,-4.2 -7,-8.4 -8,-3.7 -8,23.3 l 1,27 11,2 c 39,8 79,48 90,91 25,91 -63,178 -153,156 z m 66,-48 c 8,-3 21,-11 27,-20 16,-16 22,-33 22,-57 0,-17 -1,-23 -8,-38 -10,-19 -19,-28 -40,-39 -22,-11 -50,-11 -73.2,1 -30.7,15 -47,42 -47,76 0,26 7.3,43 23.9,60 25.3,25 64.3,34 95.3,17 z m -51,-51 c -17,-10 -19.3,-35 -3,-48 24,-21 59,6 47,35 -4,11 -17,19 -28,19 -4,0 -11,-3 -16,-6 z" />' );
      break;
    case 'neptune': $rest = array ( 'height' => 400, 'width' => 351,
      'body' => '<path  stroke="inherit" stroke-width="2" d="m 157,389 c -1,-3 -2,-16 -2,-26 l -1,-16 -23,-4 -23,0 -1,-15 c -2,-20 2,-24 27,-24 l 21,0 0,-15 c 0,-12 -1,-15 -7,-16 C 101,263 83.4,254 67.3,231 51.3,208 47,187 47,134 47,87.6 47,87.2 39.8,87.2 32,87.2 14.2,68.5 14.2,60.3 14.2,54.4 72.6,10.8 77.8,12.8 83.7,15 122,69.5 122,75.4 c 0,5.9 -22,21.7 -29.7,21.7 -13.5,0 -10.2,78.9 4.6,105.9 8.1,16 30.1,29 47.1,29 l 11,0 0,-53 0,-52 -7,0 c -9,0 -27,-17 -25,-24 2,-8.9 45,-55.2 51,-55.2 7,0 57,48.6 57,54.2 0,6 -21,24 -28,25 -6,1 -7,4 -7,52 l 0,51 12,1 c 7,1 17,-2 26,-6 21,-11 31,-32 34,-71 2,-38 -1,-55.3 -10,-55.6 C 249,98.1 231,84 231,78 c 0,-5.9 42,-63 46,-63 4,0 59,43 62,47.9 0,6 -15,25.3 -24,28 -7,1.6 -7,3.6 -6,26.1 1,36 -4,76 -15,99 -13,30 -38,48 -73,54 -20,3 -26,6 -26,16 0,16 2,18 24,18 25,0 29,4 27,24 l -1,15 -21,0 c -11,0 -23,4 -25,4 -3,3 -4,13 -4,26 l 0,23 -18,0 c -16,0 -18,0 -20,-7 z" />' );
      break;
    case 'pluto': $rest = array ( 'height' => 400, 'width' => 282,
      'body' => '<path  stroke="inherit" stroke-width="2" d="m 27.2,203 0,-176.9 74.8,0 c 92,0 111,3.2 133,22.1 23,20.6 32,45.2 30,83.8 -2,55 -27,88 -75,97 -10,1 -42,3 -70,3 -35.3,0 -53.1,2 -56,5 -6.1,6 -6.1,104 0,110 3.3,3 29.7,5 96,5 l 91,0 0,14 0,14 -112,0 -111.8,0 0,-177 z M 175,199 c 24,-5 40,-16 50,-34 12,-20 10,-59 -3,-79.9 -16,-23.5 -29,-27.9 -92,-29.3 -36.7,-1.1 -57.3,0 -62.7,2.5 -7.2,4 -7.6,6.5 -7.6,70.7 0,60 0.7,67 6.5,70 8.3,5 85.8,5 108.8,0 z" />' );
      break;
  }
  $charge = array_merge($charge,$rest);
}

?>
